<template>
  <div class="view-details">
    <div v-html="editValue"></div>
  </div>
</template>

<script>
  import { getInformation } from "@/api/gwoper/news";
  export default {
    name: "ViewDetails",
    data(){
      return{
        editValue:"",
        id: ""
      }
    },
    created() {
      this.id=this.$route.query.id
      this.getInfo()
    },
    methods:{
      // 获取图文详情
      getInfo() {
        getInformation(this.id)
          .then(response => {
            console.log(response);
            if (response.code != 200) {
              return this.msgError(response.msg);
            }
            this.editValue = response.data.content;
          })
          .catch(error => {
            console.log(error);
          });
      }
    }
  }
</script>

<style>
  .view-details{
    padding: 20px;
  }
  table tr{
    border: 1px solid #00afff !important;
  }
</style>
